<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>来吧展示es6新特性</title>
		<script type="text/javascript">
			//定义变量
			var a=10;
			{
			var a=20;//重复定义变量名称不会报错,会覆盖以前的值
			console.log(a);//20
			}
			console.log(a)//20
			
			let b=100;
			{
				let b=200
				console.log(b);
			}
				console.log(b);
			const x=10; //定义常量
			x=20;  //给常量该值
			console.log(x) //报错
		</script>
	</head>
	<body>
	</body>
</html>
